package com.youlai.boot.system.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.youlai.boot.system.mapper.TagsMapper;
import com.youlai.boot.system.model.entity.Tags;
import com.youlai.boot.system.model.vo.TagsVO;
import com.youlai.boot.system.service.TagsService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 部门 业务实现类
 *
 * @author Ray
 * @since 2021/08/22
 */
@Service
@RequiredArgsConstructor
//public class ArticleTypeServiceImpl extends ServiceImpl<ArticleTypeMapper, ArticleType> implements ArticleTypeService {

//public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService
public class TagsServiceImpl extends ServiceImpl<TagsMapper, Tags> implements TagsService {

    private final com.youlai.boot.system.converter.TagsConverter TagsConverter;

    /**
     * 热门数据
     * @return {@link Page <  ArticlePageVO  >} – 热门数据
     */
    @Override
    public List<TagsVO> getTags() {
        // 查询数据
        List<TagsVO> tags = this.baseMapper.getTags();
        // 实体转换
        return tags;
    }

}
